posal: Resolve build issues and enable GNU extensions#36
Open
qti-sbojja wants to merge 1 commit intoAudioReach:masterfrom
Open
posal: Resolve build issues and enable GNU extensions#36qti-sbojja wants to merge 1 commit intoAudioReach:masterfrom
qti-sbojja wants to merge 1 commit intoAudioReach:masterfrom
Conversation
Add _GNU_SOURCE macro to enable GNU-specific APIs like pthread_setname_np and dlinfo. Correct type mismatch by casting to timer_t* instead of posal_timer_info_t*. These changes address build errors and warnings encountered during compilation with GCC 14.2, ensuring compatibility and cleaner builds across platforms. Signed-off-by: Sairamreddy Bojja <sbojja@qti.qualcomm.com>
quic-plai
reviewed
Oct 26, 2025
| */ | ||
|
|
||
| log_pkt_ptr = log_alloc(log_code, log_pkt_size); | ||
| log_pkt_ptr = (void *)(uintptr_t) log_alloc(log_code, log_pkt_size); |
Contributor
There was a problem hiding this comment.
Why do we need (uintptr_t)? By the way, where can I find definition of log_alloc() ?
quic-plai
reviewed
Oct 26, 2025
| /* ---------------------------------------------------------------------------- | ||
| * Include Files | ||
| * ------------------------------------------------------------------------- */ | ||
| #define _GNU_SOURCE |
Contributor
There was a problem hiding this comment.
What are functions missing without _GNU_SOURCE?
Can we try to define in CMakefile only if compiler is gcc? https://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add _GNU_SOURCE macro to enable GNU-specific APIs like pthread_setname_np and dlinfo.
Correct type mismatch by casting to timer_t* instead of posal_timer_info_t*.
These changes address build errors and warnings encountered during compilation with GCC 14.2, ensuring compatibility and cleaner builds across platforms.